import 'package:flutter_ncsjqz_getx/generated/json/base/json_convert_content.dart';
import 'package:flutter_ncsjqz_getx/model/isolation_range_entity.dart';

IsolationRangeEntity $IsolationRangeEntityFromJson(Map<String, dynamic> json) {
	final IsolationRangeEntity isolationRangeEntity = IsolationRangeEntity();
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		isolationRangeEntity.msg = msg;
	}
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		isolationRangeEntity.code = code;
	}
	final IsolationRangeData? data = jsonConvert.convert<IsolationRangeData>(json['data']);
	if (data != null) {
		isolationRangeEntity.data = data;
	}
	return isolationRangeEntity;
}

Map<String, dynamic> $IsolationRangeEntityToJson(IsolationRangeEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['msg'] = entity.msg;
	data['code'] = entity.code;
	data['data'] = entity.data?.toJson();
	return data;
}

IsolationRangeData $IsolationRangeDataFromJson(Map<String, dynamic> json) {
	final IsolationRangeData isolationRangeData = IsolationRangeData();
	final bool? isBlock = jsonConvert.convert<bool>(json['isBlock']);
	if (isBlock != null) {
		isolationRangeData.isBlock = isBlock;
	}
	final int? userId = jsonConvert.convert<int>(json['userId']);
	if (userId != null) {
		isolationRangeData.userId = userId;
	}
	final List<int>? blockUserIds = jsonConvert.convertListNotNull<int>(json['blockUserIds']);
	if (blockUserIds != null) {
		isolationRangeData.blockUserIds = blockUserIds;
	}
	final String? startBlockTime = jsonConvert.convert<String>(json['startBlockTime']);
	if (startBlockTime != null) {
		isolationRangeData.startBlockTime = startBlockTime;
	}
	final String? endBlockTime = jsonConvert.convert<String>(json['endBlockTime']);
	if (endBlockTime != null) {
		isolationRangeData.endBlockTime = endBlockTime;
	}
	final dynamic? isolationRange = jsonConvert.convert<dynamic>(json['isolationRange']);
	if (isolationRange != null) {
		isolationRangeData.isolationRange = isolationRange;
	}
	final List<String>? users = jsonConvert.convertListNotNull<String>(json['users']);
	if (users != null) {
		isolationRangeData.users = users;
	}
	final int? blockType = jsonConvert.convert<int>(json['blockType']);
	if (blockType != null) {
		isolationRangeData.blockType = blockType;
	}
	return isolationRangeData;
}

Map<String, dynamic> $IsolationRangeDataToJson(IsolationRangeData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['isBlock'] = entity.isBlock;
	data['userId'] = entity.userId;
	data['blockUserIds'] =  entity.blockUserIds;
	data['startBlockTime'] = entity.startBlockTime;
	data['endBlockTime'] = entity.endBlockTime;
	data['isolationRange'] = entity.isolationRange;
	data['users'] =  entity.users;
	data['blockType'] = entity.blockType;
	return data;
}